/*
 * This file is part of TradeHelper library.
 *
 * TradeHelper library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * TradeHelper library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with TradeHelper library.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.rag.core;

import com.rag.managers.ForumManager;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;

/**
 * User: mgarin Date: 06.04.12 Time: 17:43
 */

@XStreamAlias( "User" )
public class User
{
    @XStreamAsAttribute
    private String id;

    @XStreamAsAttribute
    private String name;

    public User ()
    {
        super ();
    }

    public User ( String id, String name )
    {
        super ();
        setId ( id );
        setName ( name );
    }

    public String getId ()
    {
        return id;
    }

    public void setId ( String id )
    {
        this.id = id;
    }

    public String getName ()
    {
        return name;
    }

    public void setName ( String name )
    {
        this.name = name;
    }

    protected User clone ()
    {
        return new User ( getId (), getName () );
    }

    public String getProfileLink ()
    {
        return ForumManager.forumAddress + "memberlist.php?mode=viewprofile&u=" + id;
    }

    public String getPmLink ()
    {
        return ForumManager.forumAddress + "ucp.php?i=pm&mode=compose&u=" + id;
    }
}